using HKB.Common;
using System;
using System.Data;
using System.Web;
namespace HKB.Web
{
	public class UserExpRecordeBll
	{
		private Conn conn;
		public UserExpRecordeBll()
		{
			this.conn = Text.GetComponent<Conn>("conn", HttpContext.Current.CurrentHandler);
		}
		public UserExpRecordeBll(Conn _conn)
		{
			this.conn = _conn;
		}
		public DataTable GetAll()
		{
			return this.conn.GetDataTable("Select * From [HL_UserExpRecorde]");
		}
		public DataTable GetRecordeByID(int ID)
		{
			return this.conn.GetDataTable("Select * From [HL_UserExpRecorde] Where ID=" + ID);
		}
		public DataTable GetRecordeByUserIDandID(int UserID, int ID)
		{
			return this.conn.GetDataTable(string.Concat(new object[]
			{
				"Select * From [HL_UserExpRecorde] Where UserID=",
				UserID,
				" and ID=",
				ID
			}));
		}
		public DataTable GetRecordeByUserIDandID(int UserID)
		{
			return this.conn.GetDataTable("Select * From [HL_UserExpRecorde] Where UserID=" + UserID);
		}
		public bool DeleteRecordeByID(int ID)
		{
			return this.conn.Execute("Delete From [HL_UserExpRecorde] Where ID=" + ID) == 1;
		}
		public bool DeleteRecorde(string IDs)
		{
			return this.conn.Execute("Delete From [HL_UserExpRecorde] Where ID in (" + IDs + ")") >= 1;
		}
		public bool DeleteRecordeByUserID(int UserID)
		{
			return this.conn.Execute("Delete From [HL_UserExpRecorde] Where UserID=" + UserID) >= 1;
		}
	}
}
